<?php
class AppInfo {
  private static $instance;   

  public $data = array();

  private function __construct() {}

   public static function Load() {
    if (!isset(self::$instance)) {
      $c = __CLASS__;
      self::$instance = new $c;
    }

    return self::$instance;
  }

  public function __set($key, $value) {
    $this->data[$key] = $value;

    return true;
  }

  public function __get($key) {
    if(array_key_exists($key, $this->data)) {
        return $this->data[$key];
    } else {
      return null;
    }
  }

  public function __clone() {
    trigger_error('Clone is not allowed.', E_USER_ERROR);
  }

}
?>